package com.cocotea.example.controller;

import com.cocotea.example.model.SysUser;
import com.cocotea.example.service.ISysUserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RequestMapping("/test")
@RestController
public class TestController {
    @Resource
    private ISysUserService sysUserService;

    @PostMapping("/index")
    public String index(@RequestBody SysUser sysUser) {
        System.out.println("还未进入...");
        int i = sysUserService.addUser(sysUser);
        return "success,count=" + i;
    }

    @PostMapping("/index2")
    public String index2(@RequestBody SysUser sysUser) {
        System.out.println("还未进入...");
        int i = sysUserService.addUser(sysUser);
        return "success,count=" + i;
    }
}
